home *** CD-ROM | disk | FTP | other *** search
- COMMENT %
- ============================================================================
- Gets the keyboard shift status.
-
- ===========================================================================%
- getShiftStatus MACRO Dest
- mov ah,2 ;Pass shift status function code
- int 16h ;Keyboard interrupt
- IFDIF <Dest>,<ax>
- mov Dest,ax
- ENDIF
- ENDM
-
-
-
- COMMENT %
- ============================================================================
- Tests wether there has been a keyboard event.
-
- ===========================================================================%
- ifNoKey MACRO Label1,Label2
- mov ah,1
- int 16h
- jz Label1
- IFNB <Label2>
- jmp Label2
- ENDIF
- ENDM
-
-
-
- COMMENT %
- ============================================================================
- Reads a byte from the keyboard.
-
- ===========================================================================%
- readKey MACRO Scan,Ascii
- mov ah,0
- int 16h
- IFDIF <Scan>,<ah>
- mov Scan,ah
- ENDIF
- IFDIF <Ascii>,<al>
- mov Ascii,al
- ENDIF
- ENDM
-